<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page import="com.neusoft.bean.T_User" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">
<head>
<title>Matrix Admin</title>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="<%=basePath%>/css/bootstrap.min.css" />
<link rel="stylesheet" href="<%=basePath%>/css/bootstrap-responsive.min.css" />
<link rel="stylesheet" href="<%=basePath%>/css/colorpicker.css" />
<link rel="stylesheet" href="<%=basePath%>/css/datepicker.css" />
<link rel="stylesheet" href="<%=basePath%>/css/uniform.css" />
<link rel="stylesheet" href="<%=basePath%>/css/select2.css" />
<link rel="stylesheet" href="<%=basePath%>/css/matrix-style.css" />
<link rel="stylesheet" href="<%=basePath%>/css/matrix-media.css" />
<link rel="stylesheet" href="<%=basePath%>/css/bootstrap-wysihtml5.css" />
<link href="font-awesome/css/font-awesome.css" rel="stylesheet" />
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,800' rel='stylesheet' type='text/css'>
</head>
<body>

<!--Header-part-->
<div id="header">
  <h1><a href="dashboard.html">Matrix Admin</a></h1>
</div>
<!--close-Header-part--> 

<!--top-Header-menu-->
<div id="user-nav" class="navbar navbar-inverse">
</div>

<!--start-top-serch-->
<!--close-top-serch--> 

<!--sidebar-menu-->

<div id="sidebar"> <a href="#" class="visible-phone"><i class="icon icon-list"></i>Forms</a>
  <ul>
    <li class="submenu active"> <a href="#"><i class="icon icon-list"></i> <span>Forms</span> </a>
    </li>
  </ul>
</div>

<!--close-left-menu-stats-sidebar-->

<div id="content">
<div id="content-header">
  <div id="breadcrumb"> <a href="/SpringMVCframe/login.jsp" title="Go to Home" class="tip-bottom"><i class="icon-home"></i> Home</a> <a  href="<c:url value="javascript:history.back(-1)"/>" class="tip-bottom">Form elements</a> <a class="current">Common elements</a> </div>
  <h1>Common Form Elements</h1>
</div>
<div class="container-fluid">
  <hr>
  <div class="row-fluid">
    <div class="span6">
      <div class="widget-box">
        <div class="widget-title"> <span class="icon"> <i class="icon-align-justify"></i> </span>
          <h5>Personal-info</h5>
        </div>
        <div class="widget-content nopadding">
          <form action="/SpringMVCframe/users/updateUser" method="post" class="form-horizontal">
           <input type="hidden" name="id" value="${users.id }">
            <div class="control-group">
              <label class="control-label">姓名 :</label>
              <div class="controls">
                <input type="text" class="span11" name="username" placeholder="用户名" value="${users.username }"/>
              </div>
            </div>
            <div class="control-group">
              <label class="control-label">密码 :</label>
              <div class="controls">
                <input type="text" class="span11" name="password" placeholder="密码" value="${users.password }"/>
              </div>
            </div>
            <div class="control-group">
              <label class="control-label">备注 :</label>
              <div class="controls">
                <input type="text" class="span11" name="bz" placeholder="备注" value="${users.bz}"/>
              </div>
            </div>
            <div class="control-group">
              <label class="control-label">权限：</label>
             <%--  <div class="controls">
                <input type="text"  class="span11" name="bz" placeholder="bz"  value="${users.bz }"/>
              </div> --%>
               <div class="controls" >
                <select name="roleid"  id ="roleid" >
					<option >请选择</option>
                  <option <c:if test="${users.roleid=='0' }">selected</c:if> value="0">管理员</option>
                  <option  <c:if test="${users.roleid=='1' }">selected</c:if> value="1">普通员工</option>
                  
                </select>
              </div>
              <div class="control-group">
              <label class="control-label">test :</label>
              <div class="controls">
                <c:if test="${!empty users.roleid }"><a>aaaaa</a></c:if> 
               <!--  <a   href="http://www.google.com" disable="true" onclick="return false" >qweqwe</a> -->
              </div>
            </div>
            </div>
            <div class="control-group">
              <label class="control-label">是否可用：</label>
             <%--  <div class="controls">
                <input type="text"  class="span11" name="bz" placeholder="bz"  value="${users.bz }"/>
              </div> --%>
               
              <div class="controls" >
                <select name="isenable"  id ="isenable" >
 				<option >请选择</option>
                  <option <c:if test="${users.isenable=='是' }">selected</c:if> value="是">是</option>
                  <option  <c:if test="${users.isenable=='否' }">selected</c:if> value="否">否</option>
                  
                </select>
              </div>
              
            </div>
            <%-- <div class="control-group">
              <label class="control-label">电话：</label>
              <div class="controls">
                <input type="text" class="span11" name="telephone" placeholder="telephone" value="${users.telephone }"/>
              </div>
            </div> --%>
            <div class="form-actions">
              <button type="submit" class="btn btn-success">确认</button>
              <a class="btn btn-success" href="<c:url value="javascript:history.back(-1)"/>">返回</a>
            </div>
          </form>
        </div>
      </div>
    </div>
  </div>
</div></div>
<!--Footer-part-->
<div class="row-fluid">
  <div id="footer" class="span12"> 2013 &copy; Matrix Admin. Brought to you by <a href="http://themedesigner.in/">Themedesigner.in</a> </div>
</div>
<!--end-Footer-part--> 
<script src="js/jquery.min.js"></script> 
<script src="js/jquery.ui.custom.js"></script> 
<script src="js/bootstrap.min.js"></script> 
<script src="js/bootstrap-colorpicker.js"></script> 
<script src="js/bootstrap-datepicker.js"></script> 
<script src="js/jquery.toggle.buttons.html"></script> 
<script src="js/masked.js"></script> 
<script src="js/jquery.uniform.js"></script> 
<script src="js/select2.min.js"></script> 
<script src="js/matrix.js"></script> 
<script src="js/matrix.form_common.js"></script> 
<script src="js/wysihtml5-0.3.0.js"></script> 
<script src="js/jquery.peity.min.js"></script> 
<script src="js/bootstrap-wysihtml5.js"></script> 
<script type="text/javascript" src="${pageContext.request.contextPath }/js/jquery-1.7.1.min.js"></script>
<script>
	$('.textarea_editor').wysihtml5();
</script>
<script>
	$(document).ready(function(){ 
	
	$.ajax({
				url:"/SpringMVCframe/users/isAdmin",
                cache: true,
               // data:{username:"${users.username }",password:"${users.password }"},
                type: "POST",
                async: false,
                success: function(data) {
                	if(data!="0"){
                		$("#roleid").attr("disabled",true);
                		$("#isenable").attr("disabled",true);
                	}
                }
            });
}); 

//function a(){
//alert($("#rolename").val());
//}

</script>
</body>
</html>
